import request from "@/utils/request";

// 小程序列表查询
export function queryProgramList(params) {
  return request({
    url: '/admin/program/list',
    method: 'get',
    params,
  })
}

// 小程序编辑/修改
export function saveOrUpdateProgram(params) {
  return request({
    url: '/admin/program/saveOrUpdate',
    method: 'post',
    data: params,
  })
}

// 查询小程序详情
export function queryProgramDetail(params) {
  return request({
    url: '/admin/program/detail?smallId=' + params.smallId,
    method: 'get',
  })
}

// 查询小程序路径列表
export function queryProgramPathList(params) {
  return request({
    url: '/admin/program/path/list',
    method: 'post',
    data: params,
  })
}

// 小程序路径编辑/修改
export function saveOrUpdateProgramPath(params) {
  return request({
    url: '/admin/program/path/saveOrUpdate',
    method: 'post',
    data: params,
  })
}


// 查询小程序路径详情
export function queryProgramPathDetail(params) {
  return request({
    url: '/admin/program/path/detail?pathId=' + params.pathId,
    method: 'get',
  })
}

// 删除路径
export function delProgramPath(params) {
  return request({
    url: '/admin/program/path/delete?pathId=' + params.pathId,
    method: 'get',
  })
}

// 素材选择小程序
export function queryProgramSelect(params) {
  return request({
    url: '/admin/program/path/select',
    method: 'get',
    params,
  })
}
